package com.itheima.travel.config;

import org.springframework.context.annotation.*;
import org.springframework.stereotype.Controller;
import org.springframework.transaction.annotation.EnableTransactionManagement;
import org.springframework.web.bind.annotation.ControllerAdvice;

@SuppressWarnings("ALL")
/**
 * @Description :spring的配置类
 * @author     :LD
 */
//配置类声明
@Configuration
//注解扫描(排除controller)
@ComponentScan(value = "com.itheima.travel",
        excludeFilters = {@ComponentScan.Filter(type = FilterType.ANNOTATION,classes = Controller.class),
                          @ComponentScan.Filter(type = FilterType.ANNOTATION,classes = ControllerAdvice.class)})
//注解aop
@EnableAspectJAutoProxy
//事务注解驱动
@EnableTransactionManagement
//引入mybatis配置
@Import(MybatisConfig.class)
public class SpringConfig {
}
